<!--
        Copyright (c) 2023, LXMS (lxinet.cn).

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<template>
  <lx-modal
      ref="lxModal"
      v-model:isShow="isShow"
      :title="title"
      :confirm-loading="confirmLoading"
      width="800px"
      @ok="handleOk"
      @cancel="handleCancel"
      @open="handleOpen"

  >
    <template #modalBody>
      <a-spin :spinning="loading" :delay="loadingDelayTime">
        <lx-form ref="lxForm" :formConfig="formConfig" :formData="formData" @onSubmit="submitImpl"></lx-form>
      </a-spin>
    </template>

  </lx-modal>

</template>


<script>
import lxModal from "@components/baseComponents/lxModal/index.vue";
import lxForm from "@components/baseComponents/lxForm/index.vue"
import {editPageMinxin} from "@/minxins/editPageMinxin"

export default {
  name: "globalNav",
  components: {
    lxModal,
    lxForm

  },
  mixins: [editPageMinxin],
  data() {
    return {
      url: {
        add: "/system/dict/add",
        edit: "/system/dict/update"
      },
      formConfig: [
        {
          title: '字典编码',
          key: 'typeCode',
          component: "a-input",
          rules: [{required: true, message: "请输入字典编码", trigger: "blur"}],
          props: {
            placeholder: '请输入',
            disabled:true
          },
          colProps: {
            span: 20
          }
        },
        {
          title: '字典名称',
          key: 'name',
          component: "a-input",
          rules: [{required: true, message: "请输入字典编码", trigger: "blur"}],
          props: {
            placeholder: '请输入'
          },
          colProps: {
            span: 20
          }
        },
        {
          title: '值',
          key: 'val',
          component: "a-input",
          rules: [{required: true, message: "请输入字典编码", trigger: "blur"}],
          props: {
            placeholder: '请输入'
          },
          colProps: {
            span: 20
          }
        },
        {
          title: '备注',
          key: 'remark',
          component: "a-textarea",
          props: {
            placeholder: '请输入',
            resize: 'none',
          },
          colProps: {
            span: 20
          }
        },

        {
          title: '状态',
          key: 'status',
          component: "lx-switch",
          colProps: {
            span: 20
          }

        },


      ],

    };
  },
  methods: {
    handleOpen() {
    }


  },
  mounted() {


  }


};
</script>

<style lang="less" scoped>


</style>